package test;
import java.util.Scanner;
import java.lang.Math;
public class Prime {
	public static void main(String[] args) 
	{
		int i=1;
		int j=0;
		int[] array=new int[100];
		for(i=0;i<=99;i++)
			array[i]=1;
		@SuppressWarnings({ "resource" })
		Scanner scan = new Scanner(System.in);
		int n=scan.nextInt();
		System.out.printf("2 ");
		for(i=3;i<=n;i++)
		{
			for(j=2;j<i;j++)
			{
				if(i%j==0)
					array[i]=0;
			}
		}
		
		for(i=3;i<=n;i++){
			if(array[i]==1)
		System.out.printf("%d ",i);
		}
	}
}
